package com.zzhua.config;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyControllerAdvice {

    @ExceptionHandler(Exception.class)
    public Object object(Exception ex) {
        return ex.getMessage();
    }

}
